<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加俱乐部</title>

    <th:block th:include="fragments/header :: header"/>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',border:false">
        <form id="clubForm" action="" method="post" style="padding-top: 10px;padding-left: 20px;">
            <table width="90%">
                <tr>
                    <td>名称:</td>
                    <td>
                        <input class="easyui-textbox" name="name" style="width: 90%" data-options="required:true"/>
                    </td>
                </tr>
                <tr>
                    <td>等级:</td>
                    <td>
                        <select class="easyui-combobox" id="level" name="level" style="width: 120px" data-options="animate:true,required:true">
                        </select>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript">
    function submitForm() {
        $("#clubForm").form('submit',{
           url:'/markt/club/save',
           onSubmit:function () {
               return $(this).form('enableValidation').form('validate');
           }
        });
    }

    $(function () {
        $("#level").combobox({
            url: "/markt/club/getEvents",
            valueField:'id',
            textField:'text'
        })
    })
</script>
</body>
</html>
